#include <stdio.h>

int main()
{
    
    const int number = 10;
    int count[number];
    int _input, i;

    // 初始化数组
    for ( i = 0; i < number; i++)
        count[i] = 0;
    
    printf("Please enter 0~9 :");
    do
    {
        scanf("%d", &_input);
        if (_input >=0 && _input <=9)
        {
            count[_input]++;
        }
    } while (_input != -1);
    
    for ( i = 0; i < number; i++)
    {
        printf("Number %d has appeared %d times\n", i, count[i]);
    }
    


    return 0;
}